﻿Imports System.ComponentModel
Imports Aricie.DNN.UI.Attributes
Imports Aricie.DNN.UI.WebControls.EditControls
Imports DotNetNuke.UI.WebControls

Namespace Aricie.DNN.Modules.LuceneSearch.Settings
    Public Class Templates

        <ExtendedCategory("ResultsLayout")> _
        <TrialLimited(DNN.Security.Trial.TrialPropertyMode.Disable)> _
        Public Property ResultsControlMode() As ResultsControlMode = ResultsControlMode.TemplateView

        Private _ResultsControlPath As String = String.Empty

        <Editor(GetType(CustomTextEditControl), GetType(EditControl))> _
       <Width(350)> _
       <ConditionalVisible("ResultsControlMode", False, True, ResultsControlMode.CustomView)> _
         <ExtendedCategory("ResultsLayout")> _
        Public Property ResultsControlPath() As String
            Get
                Select Case _ResultsControlMode
                    Case ResultsControlMode.GridView
                        Return "./Controls/Results/GridViewResultsControl.ascx"
                    Case ResultsControlMode.TemplateView
                        Return "./Controls/Results/TemplateResultsControl.ascx"
                    Case Else
                        Return _ResultsControlPath
                End Select
            End Get
            Set(ByVal value As String)
                If _ResultsControlMode = ResultsControlMode.CustomView Then
                    _ResultsControlPath = value
                End If
            End Set
        End Property

        <TrialLimited(DNN.Security.Trial.TrialPropertyMode.Disable)> _
        Public Property UseLocalizedTemplates() As Boolean = False

        <TrialLimited(DNN.Security.Trial.TrialPropertyMode.Disable)> _
        Public Property UseModuleBasedTemplates() As Boolean = False


    End Class
End Namespace